function gouwuccc() {
    $('.ping-prompt').css('display', 'none');
    $('.ecs-tbar-tipbox2').css('display', 'none');
    var gouwu = JSON.parse(localStorage.getItem("cartDatas"));
    console.log(gouwu);
    var arrgou = '';
    var youcegou = '';
    var arrnum = 0;
    var arrnum2 = 0;
    var arrnum3 = 0;
    for (var v = 0; v < gouwu.length; v++) {
        arrgou += `
                 <ul class="${gouwu[v].good_id}">
                     <li>
                         <div class="p-img">
                             <a href="">
                                 <img src="${gouwu[v].good_urls.nowurl}" alt="">
                             </a>
                         </div>
                         <div class="p-name">
                             <a href="">${gouwu[v].goods_title}</a>
                         </div>
                         <div class="p-number">
                             <span class="num">${gouwu[v].buy_num}</span>
                             <div class="count">
                                 <a href="" class="count-add">
                                     <i class="iconfont icon-xiajiantou"></i>
                                 </a>
                                 <a href="">
                                     <i class="iconfont icon-xiajiantou"></i>
                                 </a>
                             </div>
                         </div>
                         <div class="p-oper">
                             <div class="price">${Number(gouwu[v].goods_price.split('￥')[1]) * Number(gouwu[v].buy_num)}</div>
                             <a href="javascript:;" class="remove">删除</a>
                         </div>
                     </li>
                 </ul>
            `;
        youcegou += `
            <li class="cart_item last">
                <div class="cart_item_pic">
                    <a href="">
                        <img src="${gouwu[v].good_urls.nowurl}" alt=""></a>
                </div>
                <div class="cart_item_desc">
                    <a href="" class="cart_item_name">${gouwu[v].goods_title}</a>
                    <div class="lie">
                        <div class="cart_item_price">
                            <span class="cart_price">${Number(gouwu[v].goods_price.split('￥')[1]) * Number(gouwu[v].buy_num)}</span>
                        </div>
                    </div>
                    <div class="p-number">
                        <a href="" class="count-remove">
                            <em>-</em>
                        </a>
                        <span class="num">${gouwu[v].buy_num}</span>
                        <a href="" class="count-add">
                            <em>+</em>
                        </a>
                    </div>
                </div>
            </li>
            `;
        arrnum += Number(gouwu[v].buy_num);
        arrnum2 += Number(gouwu[v].goods_price.split('￥')[1]) * Number(gouwu[v].buy_num);
    };
    var arrgou2 = `
        <div class="p-total">共${arrnum}件商品  共计：${arrnum2}</div>
        <div class="btn-cart">去购物车</div>
        `;
    var youcegou2 = `
    <div class="cart_handler_header">
        <span class="cart_handler_left">共<span class="cart_num red">${arrnum}</span>件商品</span>
        <span class="cart_handler_right">¥${arrnum2}</span>
    </div>
    <a target="_blank" class="cart_go_btn" href="../pages/Process.html">去购物车结算</a>
        `;
    $('.settleup-content .mb').html(arrgou2);
    $('.cart_num').text(arrnum);
    $('.settleup-content .mc').html(arrgou);
    // 右侧购物车
    $('.ibar_cart_product ul').html(youcegou);
    $('.cart_handler').html(youcegou2);
    // 删除商品
    $('.remove').click(function () {
        $(this).parents('ul').remove();
        var namex = $(this).parents('ul').attr('class');
        // console.log(namex);
        var namexx = '';
        for (var d = 0; d < gouwu.length; d++) {
            if (gouwu[d].good_id == namex) {
                namexx = gouwu[d].good_id;
                gouwu.splice(d, 1);
            }
        };
        console.log(gouwu);
        localStorage.setItem("cartDatas", JSON.stringify(gouwu));
        gouwuccc();
    });
};
gouwuccc();